package com.station.service.mapper;

import com.station.annotation.DataSource;
import com.station.vo.RelateDunitVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.context.annotation.Primary;

import java.util.List;

/**
 * @Description:
 * @Author: dongfangyu
 * @Date: 2025/9/18
 */

@Mapper
public interface RelateDunitsMapper {

    /**
     * 查询供应商列表
     * @param
     * @return
     */
    @DataSource("finance")
    @Select("SELECT relatedName FROM relatedunits ")
    List<String> selectRelateDunits();

    /**
     * 查询供应商列表
     * @param vendorId 商户id
     * @return
     */
    @DataSource("finance")
    @Select("SELECT relatedName,relatedCode FROM relatedunits WHERE df = 0 and vendorId = #{vendorId}")
    List<RelateDunitVo> selectRelateDunitList(Long vendorId);

}
